const { NODE_ENV, REACT_APP_BUILD_DEV } = process.env
const Dev = 'http://sit.miaocode.com/core'
const Prod = 'http://www.miaocode.com/core'

const API = NODE_ENV === 'production' && !REACT_APP_BUILD_DEV ? Prod : Dev

const { clientWidth, clientHeight } = document.body

if (NODE_ENV === 'production') {
    console.log = () => {}
    console.warn = () => {}
} //生产环境禁用console.log

let configs = {
    API,
    errorTypes: {
        '404': '请求出错',
        '500': '服务器出错',
        '400': '参数错误',
    },
    headerHeight: 42,
    turtleTitleHeight: 36,
    sidebarWidth: 400,
    toastIndex: 999,
    modalIndex: 99,
    fullScreenIndex: 100,
    headerIndex: 90,
    clientWidth,
    clientHeight,
}
export default  configs;


// WEBPACK FOOTER //
// ./src/utils/config.js